<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C++ API Reference: nvtx3::v1::color Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C++ API Reference<span id="projectnumber">&#160;1.0</span>
   </div>
   <div id="projectbrief">C++ convenience wrappers for NVTX v3 C API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nvtx3</b></li><li class="navelem"><b>v1</b></li><li class="navelem"><a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnvtx3_1_1v1_1_1color-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nvtx3::v1::color Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Represents a custom color that can be associated with an NVTX event via it's <code><a class="el" href="classnvtx3_1_1v1_1_1event__attributes.html" title="Describes the attributes of a NVTX event.">event_attributes</a></code>.  
 <a href="classnvtx3_1_1v1_1_1color.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a6327e421cdd233398693a2804aea942f"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">value_type</a> = uint32_t</td></tr>
<tr class="memdesc:a6327e421cdd233398693a2804aea942f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type used for the color's value.  <a href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">More...</a><br /></td></tr>
<tr class="separator:a6327e421cdd233398693a2804aea942f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a671a9e63379a2896f5c689fb0a37f0a9"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#a671a9e63379a2896f5c689fb0a37f0a9">color</a> (<a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">value_type</a> hex_code) noexcept</td></tr>
<tr class="memdesc:a671a9e63379a2896f5c689fb0a37f0a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <code>color</code> using the value provided by <code>hex_code</code>.  <a href="classnvtx3_1_1v1_1_1color.html#a671a9e63379a2896f5c689fb0a37f0a9">More...</a><br /></td></tr>
<tr class="separator:a671a9e63379a2896f5c689fb0a37f0a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd11ca09f1b3a66041cea45d4141dc37"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#abd11ca09f1b3a66041cea45d4141dc37">color</a> (<a class="el" href="structnvtx3_1_1v1_1_1argb.html">argb</a> argb_) noexcept</td></tr>
<tr class="memdesc:abd11ca09f1b3a66041cea45d4141dc37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>color</code> using the alpha, red, green, blue components in <code>argb</code>.  <a href="classnvtx3_1_1v1_1_1color.html#abd11ca09f1b3a66041cea45d4141dc37">More...</a><br /></td></tr>
<tr class="separator:abd11ca09f1b3a66041cea45d4141dc37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47084ed086b5071cd7b070b0a4611e24"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#a47084ed086b5071cd7b070b0a4611e24">color</a> (<a class="el" href="structnvtx3_1_1v1_1_1rgb.html">rgb</a> rgb_) noexcept</td></tr>
<tr class="memdesc:a47084ed086b5071cd7b070b0a4611e24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>color</code> using the red, green, blue components in <code>rgb</code>.  <a href="classnvtx3_1_1v1_1_1color.html#a47084ed086b5071cd7b070b0a4611e24">More...</a><br /></td></tr>
<tr class="separator:a47084ed086b5071cd7b070b0a4611e24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44f694cefa3afee1d9dfbf2fde3a06f4"><td class="memItemLeft" align="right" valign="top">constexpr <a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">value_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#a44f694cefa3afee1d9dfbf2fde3a06f4">get_value</a> () const noexcept</td></tr>
<tr class="memdesc:a44f694cefa3afee1d9dfbf2fde3a06f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>color</code>s argb hex code.  <a href="classnvtx3_1_1v1_1_1color.html#a44f694cefa3afee1d9dfbf2fde3a06f4">More...</a><br /></td></tr>
<tr class="separator:a44f694cefa3afee1d9dfbf2fde3a06f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af550398d7d76d9452576860a4363d75c"><td class="memItemLeft" align="right" valign="top">constexpr nvtxColorType_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1color.html#af550398d7d76d9452576860a4363d75c">get_type</a> () const noexcept</td></tr>
<tr class="memdesc:af550398d7d76d9452576860a4363d75c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the NVTX color type of the color.  <a href="classnvtx3_1_1v1_1_1color.html#af550398d7d76d9452576860a4363d75c">More...</a><br /></td></tr>
<tr class="separator:af550398d7d76d9452576860a4363d75c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c824086b0d07c9527afec79c598f4e0"><td class="memItemLeft" align="right" valign="top"><a id="a0c824086b0d07c9527afec79c598f4e0" name="a0c824086b0d07c9527afec79c598f4e0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>color</b> (<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> const &amp;)=default</td></tr>
<tr class="separator:a0c824086b0d07c9527afec79c598f4e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae26eabee9adce4df2d6375aeaac4b485"><td class="memItemLeft" align="right" valign="top"><a id="ae26eabee9adce4df2d6375aeaac4b485" name="ae26eabee9adce4df2d6375aeaac4b485"></a>
<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> const &amp;)=default</td></tr>
<tr class="separator:ae26eabee9adce4df2d6375aeaac4b485"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98ca0bcbc81634330cb62b3c336bf071"><td class="memItemLeft" align="right" valign="top"><a id="a98ca0bcbc81634330cb62b3c336bf071" name="a98ca0bcbc81634330cb62b3c336bf071"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>color</b> (<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a98ca0bcbc81634330cb62b3c336bf071"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f73227a58430bb87d0386b34fd248c3"><td class="memItemLeft" align="right" valign="top"><a id="a0f73227a58430bb87d0386b34fd248c3" name="a0f73227a58430bb87d0386b34fd248c3"></a>
<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classnvtx3_1_1v1_1_1color.html">color</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a0f73227a58430bb87d0386b34fd248c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Represents a custom color that can be associated with an NVTX event via it's <code><a class="el" href="classnvtx3_1_1v1_1_1event__attributes.html" title="Describes the attributes of a NVTX event.">event_attributes</a></code>. </p>
<p >Specifying colors for NVTX events is a convenient way to visually differentiate among different events in a visualization tool such as Nsight Systems. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01018">1018</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a6327e421cdd233398693a2804aea942f" name="a6327e421cdd233398693a2804aea942f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6327e421cdd233398693a2804aea942f">&#9670;&#160;</a></span>value_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">nvtx3::v1::color::value_type</a> =  uint32_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type used for the color's value. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01021">1021</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a671a9e63379a2896f5c689fb0a37f0a9" name="a671a9e63379a2896f5c689fb0a37f0a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a671a9e63379a2896f5c689fb0a37f0a9">&#9670;&#160;</a></span>color() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::color::color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">value_type</a>&#160;</td>
          <td class="paramname"><em>hex_code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a <code>color</code> using the value provided by <code>hex_code</code>. </p>
<p ><code>hex_code</code> is expected to be a 4 byte argb hex code.</p>
<p >The most significant byte indicates the value of the alpha channel (opacity) (0-255)</p>
<p >The next byte indicates the value of the red channel (0-255)</p>
<p >The next byte indicates the value of the green channel (0-255)</p>
<p >The least significant byte indicates the value of the blue channel (0-255)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hex_code</td><td>The hex code used to construct the <code>color</code> </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01040">1040</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="abd11ca09f1b3a66041cea45d4141dc37" name="abd11ca09f1b3a66041cea45d4141dc37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd11ca09f1b3a66041cea45d4141dc37">&#9670;&#160;</a></span>color() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::color::color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnvtx3_1_1v1_1_1argb.html">argb</a>&#160;</td>
          <td class="paramname"><em>argb_</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>color</code> using the alpha, red, green, blue components in <code>argb</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argb</td><td>The alpha, red, green, blue components of the desired <code>color</code> </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01048">1048</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a47084ed086b5071cd7b070b0a4611e24" name="a47084ed086b5071cd7b070b0a4611e24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47084ed086b5071cd7b070b0a4611e24">&#9670;&#160;</a></span>color() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::color::color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnvtx3_1_1v1_1_1rgb.html">rgb</a>&#160;</td>
          <td class="paramname"><em>rgb_</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>color</code> using the red, green, blue components in <code>rgb</code>. </p>
<p >Uses maximum value for the alpha channel (opacity) of the <code>color</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rgb</td><td>The red, green, blue components of the desired <code>color</code> </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01061">1061</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af550398d7d76d9452576860a4363d75c" name="af550398d7d76d9452576860a4363d75c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af550398d7d76d9452576860a4363d75c">&#9670;&#160;</a></span>get_type()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtxColorType_t nvtx3::v1::color::get_type </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the NVTX color type of the color. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01076">1076</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a44f694cefa3afee1d9dfbf2fde3a06f4" name="a44f694cefa3afee1d9dfbf2fde3a06f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44f694cefa3afee1d9dfbf2fde3a06f4">&#9670;&#160;</a></span>get_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr <a class="el" href="classnvtx3_1_1v1_1_1color.html#a6327e421cdd233398693a2804aea942f">value_type</a> nvtx3::v1::color::get_value </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the <code>color</code>s argb hex code. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01070">1070</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
